package org.demo.base.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 所有自定义的异常都是这个类的子类
 * @author tomdog
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class CustomException extends RuntimeException {

    private Integer code;

    public CustomException(String msg) {
        super(msg);
    }

    public CustomException(int code, String msg) {
        super(msg);
        this.code = code;
    }
}